package cn.tedu.spring.scope;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class TestOrder {
    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext
                ("cn.tedu.spring.scope");
        Order bean1 = context.getBean(Order.class);
        Order bean2 = context.getBean(Order.class);
        if(bean1 == bean2){
            System.out.println("是同一个对象");
        }else {
            System.out.println("不是同一个对象");
        }

    }
}
